package engine.systems.spatial.parallaxScroll
{
	import ash.core.Component;
	import engine.systems.spatial.spatial.Spatial;
	
	public class ParallaxScroll extends Component
	{
		public var target:Spatial;
		
		public var axis:int;
		
		public var rateX:Number;
		public var rateY:Number;
		
		public var offsetX:Number;
		public var offsetY:Number;
		
		public function ParallaxScroll(target:Spatial, rateX:Number = 0, rateY:Number = 0, offsetX:Number = 0, offsetY:Number = 0, axis:int = 2)
		{
			this.target		= target;
			this.rateX 		= rateX;
			this.rateY 		= rateY;
			this.offsetX 	= offsetX;
			this.offsetY 	= offsetY;
			this.axis		= axis;
		}
		
		override public function destroy():void
		{
			this.target = null;
		}
	}
}